home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Network Support Library
/
RoseWare - Network Support Library.iso
/
apidev
/
sc3x04.exe
/
CLRCONN.C
< prev
next >
Wrap
C/C++ Source or Header
|
1993-08-06
|
3KB
|
62 lines
// ╔════════════════════════════════════════════════════════════════════╗
// ║ ║
// ║ module: clrconn.c ║
// ║ abstract: This module shows how to make 3.x system calls using ║
// ║ the F2 Shell Interface. Obviously, it requires the ║
// ║ NetWare Shell. ║
// ║ ║
// ║ environment: NetWare 3.x v3.11 ║
// ║ Borland C++ 3.1 ║
// ║ ║
// ║ This software is provided as is and carries no warranty ║
// ║ whatsoever. Novell disclaims and excludes any and all implied ║
// ║ warranties of merchantability, title and fitness for a particular ║
// ║ purpose. Novell does not warrant that the software will satisfy ║
// ║ your requirements or that the software is without defect or error ║
// ║ or that operation of the software will be uninterrupted. You are ║
// ║ using the software at your risk. The software is not a product ║
// ║ of Novell, Inc. or any of subsidiaries. ║
// ║ ║
// ║ **** NOTICE **** NOTICE **** NOTICE **** ║
// ║ ║
// ║ This example code has not been extensively tested and therefore ║
// ║ should be run on a test server before used in a production en- ║
// ║ vironment. Also, a backup is recommended before the installation ║
// ║ of any untested component. ║
// ║ ║
// ╚════════════════════════════════════════════════════════════════════╝
#include <dos.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
#include "nwsys.h"
struct {
int bufLen;
char func;
char connNum;
} Req;
main(int argc, char *argv[])
{
int ccode;
if (argc < 2) {
printf("Usage: CLRCONN <connection number>\n");
exit(1);
}
Req.bufLen = sizeof(Req) - 2;
Req.func = 0xd2;
Req.connNum = atoi(argv[1]);
ccode = NWSystemCall(0x17, &Req, sizeof(Req), NULL, 0);
if (ccode != 0) {
printf("Clear Connection failed. Retcode = 0x%x\n", ccode);
exit(1);
}
return(0);
}